<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%-- <<jsp:useBean id="criancas" class="dao.CriancaDAO"></jsp:useBean> --%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Vacinas Pendentes</title>
</head>
<body>
	<c:if test="${criancas != null && criancas.size() > 0}" >
		<table border="1">
			<thead>
				<tr>
					<td colspan="3">Vacinas Pendentes</td>
					
				</tr>
			</thead>
			<tbody>
				<c:forEach items="${criancas}" var="item">
					<tr>
						<td colspan="3"><c:out value="${item.crianca.nome}"></c:out> </td>												
					</tr>
					<tr>
						<td colspan="2" align="center">Vacina</td>
						<td align="center">Aplicação</td>
					</tr>
					<c:forEach items="${item.vacinas}" var="vacina">
						<tr>
							<td colspan="2" align="right"><c:out value="${vacina.nome}"></c:out></td>
							<td align="right"><c:out value="${vacina.idadeVacinacao}"></c:out> meses</td>
						</tr>
					</c:forEach>
				</c:forEach>
			</tbody>
			
		</table>
	</c:if>
</body>
</html>